//
// Created by yanhai on 2021/5/2.
//
#include <iostream>
#include <thread>

int main(int argc, char **argv)
{
    auto func = [] {
        std::cout << "我的线程开始执行了" << std::endl;
        //...
        std::cout << "我的线程执行结束了" << std::endl;
    };
    std::thread t(func);
    t.join();
    return 0;
}
